import cv2

def crop_image():
    # 读取图像
    img = cv2.imread('1.png')
    # 获取图像的高度和宽度
    height, width = img.shape[:2]
    # 裁剪图像，从上下左右各裁剪5个像素点
    cropped_img = img[10:height-10, 10:width-10]
    # 显示裁剪后的图像
    cv2.imshow('Cropped Image', cropped_img)
cv2.waitKey(0)
cv2.destroyAllWindows()